import React, { Component } from 'react'
import Home from './Home'
import eventBus from './utils/event-bus'
export class App extends Component {


  prevClick(name,age){
    console.log(323, name, age);
  }

  componentDidMount(){
    eventBus.on('prev', this.prevClick)
  }
  componentWillUnmount(){
    eventBus.off('prev',this.prevClick)
  
  }
  render() {
    return (
      <div>
        <p>App</p>
        <Home />
      </div>
    )
  }
}

export default App